﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net;

namespace Hardanger.Features.ServerFuzzer.DetectionEngine
{
    public class Http500ResponseCodeDetectionEngine : IDetectionEngine
    {
        private static Http500ResponseCodeDetectionEngine _current;
        public static Http500ResponseCodeDetectionEngine Current
        {
            get
            {
                if (_current == null)
                    _current = new Http500ResponseCodeDetectionEngine();
                return _current;
            }
        }

        public bool ProcessResponse(TCPWebResponse httpResponse)
        {
            if (httpResponse.StatusCode == "500")
            {
                return true;
            }
            return false;
        }

        public string Name
        {
            get
            {
                return "HTTP 500 Response Code";
            }
        }
    }
}
